<template>
    <template v-if="!route.meta.hideHeader">
        <LazyLayoutHeaderM v-if="pageStore.isMobile" />
        <LazyLayoutHeaderP v-else />
    </template>

    <!-- LiveAd -->
    <template v-if="route.name === 'home'">
        <LazyLiveAdM v-if="pageStore.isMobile" />
        <LazyLiveAdP v-else />
    </template>

    <template v-if="!route.meta.hideHeader">
        <LazyLayoutSearchM v-if="pageStore.isMobile" />
        <LazyLayoutSearchP v-else-if="route.name !== 'home' &&
            !route.name.includes('materialStore') &&
            !route.name.includes('updatePwd') &&
            !route.name.includes('homepage')
            " />
    </template>

    <slot />

    <LazySignInFabM v-if="pageStore.isMobile" />
    <LazyLayoutSlideRightP v-else />

    <ClientOnly>
        <LazyCommentButtonP v-if="!pageStore.isMobile && userStore.isLogin" />
    </ClientOnly>

    <template v-if="!route.meta.hideFooter">
        <LazyLayoutFooterM v-if="pageStore.isMobile" />
        <LazyLayoutFooterP v-else />
    </template>
</template>
<script setup>
const pageStore = usePageStore();
const userStore = useUserStore();
const route = useRoute();
</script>
<style lang="scss" scoped></style>
